//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package File;

import java.io.File;
import java.io.IOException;

public class FileMethod_demo {
    public FileMethod_demo() {
    }

    public static void main(String[] args) throws IOException {
        File f1 = new File("JavaTest\\src\\study\\File\\文件\\a.txt");
        System.out.println(f1.isDirectory());
        System.out.println(f1.isFile());
        System.out.println(f1.exists());
        System.out.println("---------------------------------------");
        f1 = new File("JavaTest\\src\\study\\File\\文件\\文件夹");
        System.out.println(f1.isDirectory());
        System.out.println(f1.isFile());
        System.out.println(f1.exists());
        System.out.println("---------------------------------------");
        f1 = new File("JavaTest\\src\\study\\File\\文件\\文件夹\\c");
        System.out.println(f1.isDirectory());
        System.out.println(f1.isFile());
        System.out.println(f1.exists());
        System.out.println("---------------------------------------");
        File f2 = new File("JavaTest\\src\\study\\File\\文件\\a.txt");
        System.out.println(f2.length());
        File f3 = new File("JavaTest\\src\\study\\File\\文件\\文件夹");
        System.out.println(f3.length());
        System.out.println("---------------------------------------");
        System.out.println(f2.getAbsolutePath());
        System.out.println(f3.getAbsolutePath());
        System.out.println("---------------------------------------");
        System.out.println(f2.getPath());
        System.out.println(f3.getPath());
        System.out.println("---------------------------------------");
        System.out.println(f2.getName());
        System.out.println(f3.getName());
        System.out.println("---------------------------------------");
        System.out.println(f2.lastModified());
        System.out.println(f3.lastModified());
        System.out.println("---------------------------------------");
        File f4 = new File("JavaTest\\src\\study\\File\\文件\\b.txt");
        System.out.println(f4.createNewFile());
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹2")).createNewFile());
        System.out.println("---------------------------------------");
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹3")).mkdir());
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹3\\aaa\\aaa\\aa")).mkdir());
        System.out.println("---------------------------------------");
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹3\\aaa\\aaa\\aa")).mkdirs());
        System.out.println("---------------------------------------");
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹3\\aaa\\aaa")).delete());
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹3\\aaa\\aaa\\aa")).delete());
        System.out.println((new File("JavaTest\\src\\study\\File\\文件\\文件夹2")).delete());
        System.out.println("---------------------------------------");
        File[] f5 = (new File("JavaTest\\src\\study\\File\\文件")).listFiles();

        for(File f : f5) {
            System.out.println(f);
        }

        System.out.println("---------------------------------------");
    }
}
